﻿using ZyGames.Framework.Game.Contract;
using ZyGames.Tianjiexing.Lang;
using ZyGames.Framework.Common;

namespace ZyGames.DZPocker.Script.CsScript.Action
{
	/// <summary>
	/// 1016_随机取玩家名字接口
	/// </summary>
	public class Action10016 : BaseAction
	{
		private string _name;

		public Action10016(HttpGet actionGetter)
			: base((short)ActionType.DZGetRandomName, actionGetter)
		{
		}

		public override void BuildPacket()
		{
			this.PushIntoStack(_name);

		}

		public override bool GetUrlElement()
		{
			return true;
		}

		public override bool TakeAction()
		{
			var lang = LanguageManager.GetLang();
			_name = RandomUtils.RandomNickName(lang.St_FirstNickNames, lang.St_LastNickNames);
			return true;
		}
	}
}